﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SerialportSample
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void Form2_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            string aa = "";
            if (DateTime.Now.ToString("yyyy") == "2023")
            {
                aa = "123456";
            }
            else
            {
                aa = DateTime.Now.ToString("ddHHmm");
            }
            if (pass.Text == aa)
            {
                SerialportSampleForm form1 = new SerialportSampleForm();
                form1.Show();
                this.Hide();
            }
        }
    }
}
